class Blog < ActiveRecord::Base
    has_many :tags, :through => :blogtags
    has_many :blogtags, :dependent => true
    validates_format_of :url, :with => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix,:message => "should be 'http://xxxxxx'"
end
